package mo.leetcode_top;

import java.util.Arrays;

public class L1877 {

    public int minParSum(int[] nums) {
        Arrays.sort(nums);
        int min = Integer.MIN_VALUE;
        for (int i = 0; i < nums.length/2; i++) {
            int sum = nums[i] + nums[nums.length-1-i];
            if (sum > min) {
                min = sum;
            }
        }
        return min;
    }

}
